package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
)

func httpHandle(w http.ResponseWriter, r *http.Request) {
	resquestH := r.Header.Clone()
	responseH := w.Header()
	for i := range resquestH {
		responseH.Set(i, resquestH.Get(i))
	}
	version := "VERSION"
	version = version + os.Getenv(version)
	responseH.Set("Server", version)
	w.WriteHeader(http.StatusOK)
	fmt.Printf("ip:%s,HttCode:%d", r.RemoteAddr, http.StatusOK)
}

func main() {
	http.HandleFunc("/localhost/healthz", httpHandle)
	log.Fatal(http.ListenAndServe(":80", nil))
}
